package cn.edu.lcu.cs.designpattern.factory.theory;

public class Client {
    public static void main(String[] args) {
        // 创建工厂A
        ProductFactory factoryA = new ProductAFactory();
        // 工厂生产产品A
        Product productA = factoryA.build();
        // 使用产品A
        productA.print();

        ProductFactory factoryB = new ProductBFactory();
        Product productB = factoryB.build();
        productB.print();
    }
}
